

import { PlayerBeeAnimatorManager } from "src/Ldz_GameCore/FSM_Animation/EnityAnimation/PlayerBeeAnimator/PlayerBeeAnimatorManager";
import { EntityState } from "src/Ldz_GameCore/GeneralScripts/GameDefine";
import HoneyBeesBase from "../HoneyBeeManager/HoneyBeesBase";


//玩家
export default class PlayerBee extends HoneyBeesBase {

    public constructor(Lv: number = 1) {
        super();
        this.m_AttributeBase.LodeAttribute("Gongfeng", Lv);
    }

    onAwake() {
        super.onAwake();
        this.m_AnimatorManager = new PlayerBeeAnimatorManager();
        this.m_AnimatorManager.InitManager(this.m_SceneSprite3d, this.m_SoldiersBase);
        this.m_AnimatorManager.ChangeState(EntityState.Idle);
    }
    onStart() {
    }
    MoveToPos(Pos: Laya.Vector3) {
        super.MoveToPos(Pos);
    }

    AttackTarget(_TargetObj: Laya.Sprite3D): boolean {
        return super.AttackTarget(_TargetObj);
    }

    BeAttacked(Tag: HoneyBeesBase, Buffbase: any) {
        let Pos: Laya.Vector3 = this.m_SceneSprite3d.transform.localPosition;
        let Scale: Laya.Vector3 = this.m_SceneSprite3d.transform.localScale;

        if (super.BeAttacked(Tag)) {
            if (!this.Isone) return true;
            this.Isone = false;
            return true;
        } else {

        }
        return false;
    }

    Isone = true;
    onUpdate() {
        super.onUpdate();
    }



}